﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Reticulum
{
    class IfSuffix
    {
        public static int IfSuffixs(string Suffixs)
        {
            /* 功能：判断用户的文件并给予文件相对应的图标
             * 作者：蒙兰德
             * 编写时间：2020/7/1/16:34
             * 
             * */
            if (Suffixs == ".gif" || Suffixs == ".png" || Suffixs == ".jpg" || Suffixs == ".jpeg" || Suffixs == ".bmp")
            {
                return 1;
            }
            else if (Suffixs == ".xlsx" || Suffixs == ".xls" || Suffixs == ".xlsm")
            {
                return 0;
            }
            else if (Suffixs == ".doc" || Suffixs == ".docx")
            {
                return 4;
            }
            else if (Suffixs == ".txt")
            {
                return 2;
            }
            else if (Suffixs==".ppt" || Suffixs == ".pptx")
            {
                return 5;
            }
            else if(Suffixs == ".wqv" || Suffixs == ".mp3" || Suffixs == ".wma" || Suffixs == ".flac" || Suffixs == ".ape") 
            {
                return 6;
            }
            else if (Suffixs == ".cs")
            {
                return 7;
            }
            else//其他文件
            {
                return 3;
            }
        }
    }
}
